package cn.cheln.explorer.ds.database;

import android.content.Context;
import android.database.Cursor;
import cn.cheln.explorer.beans.FileInfo;
import cn.cheln.explorer.beans.FileUtil;
import cn.cheln.explorer.beans.MusicInfo;
import cn.cheln.support.log.Logs;

public class DatasrcTransferer
{
  // ERROR //
  public static <T extends FileInfo> T mediaTransf(Context paramContext, Cursor paramCursor, java.lang.Class<? extends FileInfo> paramClass)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_3
    //   2: aload_1
    //   3: ifnull +18 -> 21
    //   6: aload_1
    //   7: invokeinterface 18 1 0
    //   12: istore 9
    //   14: iload 9
    //   16: ifeq +5 -> 21
    //   19: aconst_null
    //   20: areturn
    //   21: aload_2
    //   22: invokevirtual 24	java/lang/Class:newInstance	()Ljava/lang/Object;
    //   25: checkcast 26	cn/cheln/explorer/beans/FileInfo
    //   28: astore_3
    //   29: aload_3
    //   30: aload_1
    //   31: aload_1
    //   32: ldc 28
    //   34: invokeinterface 32 2 0
    //   39: invokeinterface 36 2 0
    //   44: invokevirtual 40	cn/cheln/explorer/beans/FileInfo:setPath	(Ljava/lang/String;)V
    //   47: aload_1
    //   48: ldc 42
    //   50: invokeinterface 32 2 0
    //   55: istore 5
    //   57: iload 5
    //   59: iconst_m1
    //   60: if_icmpeq +20 -> 80
    //   63: aload_3
    //   64: aload_1
    //   65: iload 5
    //   67: invokeinterface 36 2 0
    //   72: ldc 44
    //   74: invokevirtual 50	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   77: invokevirtual 54	cn/cheln/explorer/beans/FileInfo:setForceDir	(Z)V
    //   80: aload_3
    //   81: invokevirtual 57	cn/cheln/explorer/beans/FileInfo:buildFile	()V
    //   84: aload_1
    //   85: ldc 59
    //   87: invokeinterface 32 2 0
    //   92: istore 6
    //   94: iload 6
    //   96: iconst_m1
    //   97: if_icmpeq +15 -> 112
    //   100: aload_3
    //   101: aload_1
    //   102: iload 6
    //   104: invokeinterface 36 2 0
    //   109: putfield 63	cn/cheln/explorer/beans/FileInfo:sortKey	Ljava/lang/String;
    //   112: aload_2
    //   113: ldc 65
    //   115: if_acmpne +12 -> 127
    //   118: aload_1
    //   119: aload_3
    //   120: aload_0
    //   121: invokestatic 69	cn/cheln/explorer/ds/database/DatasrcTransferer:preserMusicInfo	(Landroid/database/Cursor;Lcn/cheln/explorer/beans/FileInfo;Landroid/content/Context;)V
    //   124: goto +30 -> 154
    //   127: aload_2
    //   128: ldc 71
    //   130: if_acmpne +24 -> 154
    //   133: aload_3
    //   134: aload_0
    //   135: invokestatic 77	cn/cheln/explorer/beans/ApkInfoUtil:preserApkInfo	(Lcn/cheln/explorer/beans/FileInfo;Landroid/content/Context;)Z
    //   138: istore 8
    //   140: iload 8
    //   142: ifeq +12 -> 154
    //   145: aload_3
    //   146: areturn
    //   147: astore 7
    //   149: aload 7
    //   151: invokevirtual 80	java/lang/Exception:printStackTrace	()V
    //   154: aload_3
    //   155: areturn
    //   156: astore 4
    //   158: aconst_null
    //   159: areturn
    //
    // Exception table:
    //   from	to	target	type
    //   6	14	147	java/lang/Exception
    //   118	124	147	java/lang/Exception
    //   133	140	147	java/lang/Exception
    //   21	57	156	java/lang/Exception
    //   63	80	156	java/lang/Exception
    //   80	94	156	java/lang/Exception
    //   100	112	156	java/lang/Exception
  }

  public static void preserMusicInfo(Cursor paramCursor, FileInfo paramFileInfo, Context paramContext)
  {
    String str1 = paramCursor.getString(paramCursor.getColumnIndex("album"));
    MusicInfo localMusicInfo1 = (MusicInfo)paramFileInfo;
    if ((str1 == null) || (str1.equals("unknown")))
      str1 = paramContext.getString(2131034257);
    localMusicInfo1.album = str1;
    String str2 = FileUtil.getParent(paramFileInfo.getPath());
    if (str2.substring(1 + str2.lastIndexOf("/")).equals(((MusicInfo)paramFileInfo).album))
      ((MusicInfo)paramFileInfo).album = paramContext.getString(2131034257);
    ((MusicInfo)paramFileInfo).album = "- " + ((MusicInfo)paramFileInfo).album;
    String str3 = paramCursor.getString(paramCursor.getColumnIndex("artist"));
    MusicInfo localMusicInfo2 = (MusicInfo)paramFileInfo;
    if ((str3 == null) || (str3.equals("unknown")))
      str3 = paramContext.getString(2131034257);
    localMusicInfo2.artist = str3;
    ((MusicInfo)paramFileInfo).thumbnail = paramCursor.getString(paramCursor.getColumnIndex("thumbnail"));
    Logs.i("thumb --------------------------" + ((MusicInfo)paramFileInfo).thumbnail);
    ((MusicInfo)paramFileInfo).album_id = Integer.valueOf(paramCursor.getInt(paramCursor.getColumnIndex("album_id")));
    ((MusicInfo)paramFileInfo).album_artist_id = Integer.valueOf(paramCursor.getInt(paramCursor.getColumnIndex("artist_id")));
  }
}

/* Location:           H:\360云盘\lewa_explorer_3.0\bin\FileApp_orig_dex2jar.jar
 * Qualified Name:     cn.cheln.explorer.ds.database.DatasrcTransferer
 * JD-Core Version:    0.5.2
 */